<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,initial-scale=1.0,width=device-width" />
		<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
		<link rel="stylesheet" href="../../css/animate.css">
		<link rel="stylesheet" href="../../css/mescroll.css">
		<link rel="stylesheet" href="../../script/swiper/swiper.css">
		<link rel="stylesheet" href="../../css/gloab.css">
		<title>主页</title>
	</head>
	<style>
		.none-order{
    text-align: center;
    color:#727272;
    line-height: 200%;
    margin-top: 1rem;
  }
  .box1 {
  	width:98%;
  	height:30px;
  	overflow:hidden;
  }
  .box1 .wrap {
  	width:100%;
  	/* 和父盒子宽度一样 */
    height:76px;
  	/* 比里层元素高16px 为了隐藏滚动条*/
    overflow-x:scroll;
  	/* 定义超出此盒子滚动 */
    overflow-y:hidden;
  }
  .box1 .wrap ul {
  	width:640px;
  	display:flex;
  }
  .box1 .wrap ul li {
  	flex:1;
  	width:60px;
  	height:60px;
  	box-sizing:border-box;
  }
  .zz-button{
    position:absolute;
    top:2.5rem;
    right:0;
    left:0;
    background: rgba(0,0,0,0.5);
    color:#fff;
    font-weight:bold;
    padding:0.1rem;
    font-size:0.3rem;
    z-index:999;
    height:0.4rem;
    line-height:0.4rem;
  }
  .zz-buttons{
    position:absolute;
    top:3rem;
    left:0;
    background: rgba(0,0,0,0.5);
    color:#fff;
    font-weight:bold;
    padding:0.1rem;
    font-size:0.25rem;
    z-index:999;
    height:0.3rem;
    line-height:0.3rem;
  }
  .zz-buttonss{
    position:absolute;
    top:3rem;
    right:0;
    background: rgba(0,0,0,0.5);
    color:#fff;
    font-weight:bold;
    padding:0.1rem;
    font-size:0.25rem;
    z-index:999;
    height:0.3rem;
    line-height:0.3rem;
  }
  .zz-img{
    width:2.5rem;
    margin:0 auto;
    background:#eee;
    height:2.5rem;
    padding:auto;
    border:1px solid #dedede;
    border-radius:0.05rem;
  }
  .zz-img img{
    width:1rem;
    margin-left:0.75rem;
    margin-top:0.3rem;
  }
  .zz-img div{
    text-align:center;
    line-height:0.45rem;
    height:0.45rem;
    margin-top:0.35rem;
    font-size:0.3rem;
    color:#999;
  }
  .zz-content{
    width:90%;
    height:0.45rem;
    line-height:0.45rem;
    text-align:center;
    margin:0.25rem auto;
    font-size:0.25rem;
    color:#999;
  }
  .zz-image{
    width:2.65rem;
    height:2.65rem;
    margin:auto;
    background: #eee;
    border-radius: 50%;
    overflow: hidden;
  }
  .zz-image img{
    width:100%;
    height: 100%;
  }
  .zz-images{
    width:85%;
    height:3rem;
    margin:0.2rem auto;
    background: #eee;
    /*overflow: hidden;*/
  }
  .zz-img-button-list{
    width:85%;
    height:1rem;
    margin:auto;
    line-height: 1rem;
  }
  .zz-img-button-list div{
    width:30%;
    float: left;
    font-size: 0.3rem;
  }
  .zz-img-button-list img{
    width:20%;
    line-height: 1rem;
    margin-top: 0rem;
    padding-top:0.2rem;
  }
  .zz-img-button-list span{
    margin-top: 0rem;
    font-size: 0.3rem;
  }
  .zz-images img{
    width:100%;
    height: 100%;
  }
  .zz-title{
    width:85%;
    height:0.45rem;
    line-height: 0.45rem;
    margin:0 auto 0.25rem;
    font-size: 0.3rem;
  }
  .zz-title input{
    height:0.45rem;
    line-height: 0.45rem;
    font-size: 0.3rem;
  }
  .zz-button{
    width:40%;
    height:0.45rem;
    text-align: center;
    background: #3b8bff;
    line-height: 0.45rem;
    margin:1rem auto;
    color:#fff;
    border-radius: 0.08rem;
  }
  #scroll-box{width: 100%;height: 0.68rem;}
  #scroll-box ul{margin:0;}
  #scroll-box li{margin:0;width: 100%;}
  .ups {
    color: black;
    display: inline-block;
    width: 17%;
    height: 0.45rem;
    left:3%;
    top:0.05rem;
    position: relative;
    overflow: hidden;
    font-size: 0.25rem;
    line-height: 0.45rem;
    color:#fff;
    border-radius: 0.05rem;
    background: #f00;
    text-align: center;
  }
  .up {
    color: black;
    display: block;
    width: 72%;
    height: 0.45rem;
    /*margin: 0 3% 0 21%;*/
    position: relative;
    top:-0.4rem;
    left:21%;
    overflow: hidden;
  }
        .down {
            color: gray;
            display: block;
            width: 96%;
            height: 0.45rem;
            margin: 0 auto;
            position: relative;
            overflow: hidden;
        }
        .up_text {
            position: absolute;
            top: 0;
            left: 100%;
            line-height: 0.45rem;
            display: block;
            word-break: keep-all;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .down_text {
            position: absolute;
            top: 0;
            left: 100%;
            line-height: 0.45rem;
            display: block;
            word-break: keep-all;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .title-form-div{
          width: 100%;
          height: 80%;
          position: relative;
          top: 0rem;
        }
        .title-div{
          width: 90%;
          height: 0.65rem;
          margin: 0.5rem auto;
          background: #f3f8fe;
          overflow: hidden;
          border-radius: 0.5rem;
        }
        .title-div i{
          font-size: 0.5rem;
          line-height: 0.65rem;
          color: #ffc514;
          padding-left: 0.2rem;
          float: left;
        }
        .title-div span{
          width: 80%;
          display: inline-block;
          height: 0.65rem;
          float: left;
        }
        .title-div input{
          height: 0.5rem;
          margin: 0.05rem 0.1rem;
          width: 90%;
          background: #f3f8fe;
          line-height: 0.65rem;
          font-size: 0.36rem;
          padding-left: 0.1rem;
          border-radius: 0.5rem;
        }
        .title-span-button{
          width: 38%;
          text-align: center;
          line-height: 0.65rem;
          background: #4293f2;
          color:#fff;
        }
        [v-cloak]{display: none;}
</style>
	<body >
		<div id="app" v-cloak>
			<div id="header" style="position:absolute;top:0;left:0;right:0;height:1.8rem;">
				<div id="statusbar"></div>
				<header class="flex wrap">
					<div class="header-logo"><img src="../../image/public/logo.png" alt="" ></div>
					<div class="header-input">
						<input type="text" v-model="guanjianci" placeholder="请输入搜索关键词">
					</div>
					<div class="" style="margin-left:0.05rem;margin-top:0.05rem;float:right"><img style="width:80%;" src="../../image/public/sou.png"
						 alt="" @click="soushuo"></div>
				</header>
			</div>
			<div id="mescroll" class="mescroll">
				<div style="width:100%;">
					<div class="head-banner" id="div1">
						<div class="swiper-container" id="swiper" style="position:relative !important;top:0;z-index:4!important;">
							<div class="swiper-wrapper" v-if="webAdveList&&webAdveList.length>0">
								<div class="swiper-slide" v-for="(item,index) in webAdveList">
									<img :src="item.icon" alt="">
								</div>
							</div>
							<div class="swiper-wrapper" v-else>
								<div class="swiper-slide">
									<img src="../../image/public/home1.jpg" alt="">
								</div>
								<div class="swiper-slide">
									<img src="../../image/public/home1.jpg" alt="">
								</div>
								<div class="swiper-slide">
									<img src="../../image/public/home1.jpg" alt="">
								</div>
							</div>
							<div class="zz-buttons">站长广告</div>
							<div class="zz-buttonss" @click="zzkj">站长空间</div>
							<div class="swiper-pagination"></div>
						</div>
					</div>
					<div class="home-navbar flex wrap" id="home-navbar">
						<div class="home-navbar-son" @click="javascript:api.openWin({name: 'dating',url:'../hongbao/dating.html',reload:true});">
							<img src="../../image/public/home2.png" alt="">
							<p>红包大厅</p>
						</div>
						<div class="home-navbar-son" @click="javascript:api.openWin({name: 'take_vip',url:'../personal/take_vip.html',reload:true});">
							<img src="../../image/public/home3.png" alt="">
							<p>升级VIP</p>
						</div>
						<div class="home-navbar-son" @click="javascript:api.openWin({name: 'take_hhr',url:'../personal/take_hhr.html',reload:true});">
							<img src="../../image/public/hhr.png" alt="">
							<p>升级合伙人</p>
						</div>
						<div class="home-navbar-son" @click="javascript:api.openWin({name: 'take_zz',url:'../personal/take_zz.html',reload:true});">
							<img src="../../image/public/home4.png" alt="">
							<p>升级站长</p>
						</div>
						<div class="home-navbar-son" @click="javascript:api.openWin({name: 'personal',url:'../personal/personal.html',reload:true});">
							<img src="../../image/public/home5.png" alt="">
							<p>充值提现</p>
						</div>
					</div>
					<div id="scroll-box" class="home-msg" v-if="newList&&newList.length>0">
						<ul id="main">
							<li v-for="(item,index) in newList">
								<div class="home-msg flex wrap">
									<div class="home-msg-lf"><img src="../../image/public/home6.png" alt=""></div>
									<div class="home-msg-rt">恭喜{{item.name}}喜提{{item.money}}元</div>
								</div>
							</li>
						</ul>
						<ul></ul>
					</div>
					<div id="scroll-box" class="home-msg" v-else>
						<ul id="main">
							<li>
								<div class="home-msg flex wrap">
									<div class="home-msg-lf"><img src="../../image/public/home6.png" alt=""></div>
									<!-- <div class="home-msg-rt">{{item.content}}</div> -->
									<div class="home-msg-rt">暂无提现数据</div>
								</div>
							</li>
						</ul>
						<ul></ul>
					</div>
					<tr>
						<td class='text-center'>
							<span class="ups">
								平台公告
							</span>
							<span class='up'>
								<span class='up_text' style="font-size:12px !important;" v-html="systemnews"></span>
							</span>
						</td>
					</tr>
					<div class="gdtt">
						<div class="gdtt-title">固定头条<span>&nbsp;排名不分先后</span>
							<span @click="javascript:api.openWin({name: 'shangtoutiao',reload:true,url:'../personal/shangtoutiao.html',allowEdit:true});"
							 style="font-size:0.25rem;display: inline-block;height:0.3rem;float:right;line-height:0.3rem;background:#f00;color:#fff;padding:0.1rem;border-radius:0.1rem;">我要上头条</span>
						</div>
						<div class="gdtt-list flex wrap">
							<div class="gdtt-list-son" v-for="(item,index) in list" :style="index==0&&index%6?'nargin-right:0;':'margin-left:1%;'">
								<div class="gdtt-list-img" v-if="item.id==0" @click="javascript:api.openWin({name: 'shangtoutiao',url:'../personal/shangtoutiao.html',allowEdit:true});">
									<img src="../../image/public/home7.png" alt="">
									<div class="gdtt-list-labels">马上抢位</div>
								</div>
								<div class="gdtt-list-img" v-else @click="javascript:api.openWin({name: 'guanggao_details',url:'../personal/guanggao_details.html',pageParam: {id: item.id}});">
									<img :src="apiUrl1+item.image" alt="">
									<!-- <div class="gdtt-list-label">固定</div> -->
									<!-- <div class="gdtt-list-label"></div> -->
								</div>
								<p v-if="item.id" @click="javascript:api.openWin({name: 'guanggao_details',url:'../personal/guanggao_details.html',pageParam: {id: item.id,uid:item.users_id,time:item.createtime}});"
								 style="overflow:hidden;height:0.48rem;line-height:0.48rem;" v-html="item.content"></p>
								<p v-else style="overflow:hidden;height:0.48rem;line-height:0.48rem;" v-html="item.content"></p>
							</div>
						</div>
					</div>
					<div>
						<div class="product-category">
							<div class="box1" v-if="daohangdata&&daohangdata.length>0">
								<div class="wrap" id="wrap">
									<ul class="product-category-bar flex">
										<div class="product-category-bar-son" v-for="(data,index) in daohangdata" :id="'nav'+data.id" :class="{hover:index==num}"
										 @click="daohangs(data.id,index,data.title)">
											{{data.title}}
										</div>
									</ul>
								</div>
							</div>
							<div class="product-category-list-son" v-for="(data,index) in daohanglist">

								<div class="product-category-list">
									<div class="product-category-list-header flex wrap">
										<div class="product-category-list-header-lf" style="height: 1.1rem;" @click="kongjian(data.uid)">
											<img v-if="data.user.avatar" :src="apiUrl1+data.user.avatar" alt="">
											<img v-else src="../../image/public/touxiang.png" alt="">
											<label class="product-category-list-header-label">{{data.user.user_type}}</label>
										</div>
										<div class="product-category-list-header-rt">
											<div class="product-category-list-header-name flex">
												<div class="product-category-list-header-name-lf F5" style="overflow:hidden;width:80%;height:0.54rem;">
													{{data.user.nickname}}
													<!-- <p style="width:30%;height:0.45rem;overflow:hidden;">{{data.nickname}}</p> -->
													<!-- <span class="kongjian" v-if="data.rank>0" style="background:#f00;border:none;color:#fff;font-size:0.25rem;line-height:0.25rem;padding:0.1rem;border-radius:0.05rem;" @click="kongjian(data.id)">空间</span> -->
												</div>
											</div>
											<div class="product-category-list-header-name flex">
												<div class="product-category-list-header-name-lb F5">
													<span class="zd-label" v-if="data.is_top==1">置顶</span>
													<span class="zdsx-label" v-if="data.auto_refresh==1">自动刷新</span>
												</div>
												<span class="kongjian" v-if="data.type_id>1" style="background:#f00;border:none;color:#fff;font-size:0.25rem;height:0.25rem;line-height:0.25rem;padding:0.1rem;border-radius:0.05rem;"
												 @click="kongjian(data.uid)">空间</span>
												<!-- <div class="product-category-list-header-name-rt F1" style="margin-top:0;" @click="aboutcontet(id = data.id,time = data.createtime)">详情&nbsp;></div> -->
											</div>
										</div>
									</div>
									<div class="product-category-list-text" v-if="data.content" @click="aboutcontet(data.id)" v-html="data.content"
									 style="height:0.8rem;overflow:hidden;"></div>
									<div v-if="data.imgs&&data.imgs.length>0">
										<div class="product-category-list-imgs flex wrap">
											<div class="product-category-list-img" v-if="index<3" :style="index==0?'margin-left:0;':''" v-for="(datas,index) in data.imgs">
												<img @click="seeImg(data,index)" :src="apiUrl1+datas" alt="">
											</div>
											<div class="product-category-list-img" v-if="data.imgs.length>3" @click="seeImg(data,3)">
												<img :src="apiUrl1+data.imgs[3]" alt="">
												<div class="product-category-list-modify">更多图片</div>
											</div>
										</div>
									</div>
									<div class="product-category-list-footer clearfix">
										<!-- <span class="wshy">排名：{{data.ranking}}</span> -->
										<span class="wshy">{{data.block}}</span>
										<span>曝光次数：{{data.view_count}}&nbsp;&nbsp;刷新：{{data.update_time_str}}</span>
										<div class="product-category-list-share fr" @click="share(id = data.id,time = data.createtime)">
											<img src="../../image/public/home99.png" alt="">
										</div>
									</div>
									<!-- <div class="product-category-list-foote" style="color:#999;" v-if="data.startime">
                  头条时间:<font style="color:#f00;">{{data.startime}}</font>至<font style="color:#f00;">{{data.endtime}}</font>
                </div> -->
								</div>
							</div>
							<div style="width:90%;text-align:center;height:0.5rem;line-height:0.5rem;margin:auto;color:#999;" @click="up">点击加载更多</div>
							<!-- <div v-if="daohanglist.length<=0" class="none-order">
                <span>暂无数据</span>
              </div> -->
						</div>
					</div>
				</div>
			</div>
			<div style="background:rgba(0,0,0,0.5);width:100%;height:1000px;position:fixed;top:0;left:0;right:0;z-index:9999;"
			 id="tc" v-show="content">
				<div style="width:90%;height:auto;background:#fff;margin:3rem auto;padding:0.5rem 0.01rem 0;border-radius:0.3rem;position:relative;left:0;right:0;top:1rem;overflow-y:hidden;">
					<div style="width:90%;margin:0 auto;text-align:center;line-height:0.45rem;font-size:0.35rem;height:0.45rem;font-weight:blod;">重要通知</div>
					<div style="width:90%;margin:0.5rem auto 0;" v-html="content">
					</div>
					<div style="width:100%;background:#eee;height:1rem;text-align:center;line-height:1rem;position:relative;buttom:0rem;left:0;right:0;font-size:0.3rem;color:#357ddc;"
					 @click="delImg">
						我知道了
						<!-- <div style="width:25%;height:0.45rem;text-align:center;line-height:0.45rem;font-size:0.3rem;margin:auto;color:#4797f4;border-radius:0.12rem;" @click="delImg"></div> -->
					</div>
				</div>
			</div>
			<!-- <div v-show="!status" style="background:rgba(0,0,0,0.5);width:100%;height:1000px;position:fixed;top:0;left:0;right:0;z-index:9999;" id="tcs">
       <div style="width:76%;height:4rem;background:#fff;margin:3rem auto;padding:0.5rem 0.5rem;border-radius:0.3rem;position:relative;top:1rem;left:0;right:0;">
         <div class="zz-title" style="text-align:center;font-size:0.35rem;">
           绑定手机号码
         </div>
         <div class="title-form-div">
           <div class="title-div">
             <div class="" style="width:25px;height:0.65rem;float:left;line-height:0.65rem;margin-left:0.22rem;margin-top:0.05rem;">
               <img src="../../image/public/user.png" alt="">
             </div>
             <span>
               <input type="text" v-model="phones" placeholder="请输入手机号">
             </span>
           </div>
           <div class="title-div">
             <div class="" style="width:25px;height:0.65rem;float:left;line-height:0.65rem;margin-left:0.22rem;margin-top:0.15rem;">
               <img src="../../image/public/code.png" alt="">
             </div>
             <span class="title-span" style="width:48%;">
               <input type="text" v-model="code" placeholder="请输入验证码">
             </span>
             <span class="title-span-button" style="width:30%;float:right !important;display:none;font-size: 0.25rem;" v-show="!showCode" @click="getCode">获取验证码</span>
             <span class="title-span-button" style="width:30%;float:right !important;display:block;font-size: 0.25rem;" v-show="showCode">{{time}}秒后再次获取</span>
           </div>
         </div>
             <div class="zz-button" @click="updatePhone">绑定</div>
       </div>
    </div> -->
		</div>
		<div class="public-progress" style="z-index:9;">
			<img src="../../icon/icon150x150.png" alt="" class="animated infinite flash" style="width:200px;height:200px;display:block;margin:200px auto;">
		</div>
		<div class="public-exit" style="display:none;z-index:10;">再按一次退出‘趣引流’</div>
	</body>
	<script src="../../script/api.js"></script>
	<script src="../../script/jquery.js"></script>
	<script src="../../script/mescroll.js"></script>
	<script src="../../script/vue.js"></script>
	<script src="../../script/app.js"></script>
	<script src="../../script/jsencrypt.js"></script>
	<script src="../../script/swiper/swiper.js"></script>
	<script src="../../script/fastclick.js"></script>
	<!-- <script type="text/javascript" src="https://s4.cnzz.com/z_stat.php?id=1278834864&web_id=1278834864"></script> -->
	<script type="text/javascript">
		var vm;
		var mySwiper;
		var mescroll;
		apiready = function() {
			console.log($api.getStorage('token'))
			api.removeLaunchView();
			api.addEventListener({
				name: 'smartupdatefinish'
			}, function(ret, err) {
				api.rebootApp();
			});
			UIScrollPicture = api.require('UIScrollPicture');
			// demos();
			setBar("statusbar");
			setFont(750);
			startVue();
			exit_init();
			var top = $("#header").outerHeight(true);
			$("#mescroll").css({
				"top": top + "px"
			});
			NewMescroll();
			$(".public-progress").fadeOut(1000);
			setTimeout(function() {
				$(".public-progress").css({
					"display": "none"
				});
			}, 2000);
		}

		function startVue() {
			vm = new Vue({
				el: "#app",
				data: {
					gdtt: ['', '', '', '', '', '', '', '', '', '', '', ''],
					list: [],
					daohangdata: [],
					daohanglist: [],
					num: 0,
					guanjianci: '',
					name: '',
					newList: [],
					page: 1,
					price: '',
					webAdveList: [],
					systemnews: '',
					content: '',
					status: 1,
					phone: '',
					phones: '',
					code: '',
					codes: '',
					time: 60,
					showCode: false,
					id: 1
				},
				created: function() {
					this.getNewList();
					this.getsection();
					this.getWebAdver();
					this.getGuDingList();
					this.getSystemnews();
					// this.getBulletinList();
					this.ranking();
					this.online();
					this.getphone();
					this.daohang();
				},
				mounted: function() {},
				methods: {
					up: function() {
						vm.page++;
						vm.daohang();
					},
					// 发送验证码
					getCode: function() {
						if (vm.phones == "") {
							api.toast({
								msg: '请输入您的手机号',
								duration: 2000,
								location: 'middle'
							});
							return;
						}
						if (!(/^1\d{10}$/.test(vm.phones))) {
							api.toast({
								msg: '手机号格式错误',
								duration: 2000,
								location: 'middle'
							});
							return;
						}
						api.ajax({
							url: apiUrl + 'api/users/TencentCode',
							method: 'post',
							data: {
								values: {
									phone: vm.phones,
								},
							}
						}, function(ret, err) {
							if (ret.status) {
								timeOut();
								vm.showCode = true;
								msg('发送成功');
							} else {
								api.toast({
									msg: ret.msg,
									duration: 2000,
									location: 'middle'
								});
							}
						});
					},
					getphone: function() {
						api.ajax({
							url: apiUrl + 'api/home/getPhone',
							method: 'post',
							data: {
								values: {
									uid: post_en($api.getStorage('uid')),
								},
							}
						}, function(ret, err) {
							console.log(JSON.stringify(ret));
							if (ret.status) {
								vm.status = ret.data;
								vm.getBulletinList();
							} else {
								vm.status = '';
							}
						});
					},
					updatePhone: function() {
						if (vm.phones == "") {
							msg('请输入微信所绑定的手机号');
							return;
						}
						if (!(/^1\d{10}$/.test(vm.phones))) {
							api.toast({
								msg: '手机号格式错误',
								duration: 2000,
								location: 'middle'
							});
							return;
						}
						if (vm.code == "") {
							msg('请输入验证码');
							return;
						}
						api.ajax({
							url: apiUrl + 'api/home/updatePhone',
							method: 'post',
							data: {
								values: {
									uid: post_en($api.getStorage('uid')),
									phone: post_en(vm.phones),
									code: post_en(vm.code),
									status: 0,
								},
							}
						}, function(ret, err) {
							if (ret.status == 1) {
								msg(ret.msg);
								setTimeout(function() {
									$api.clearStorage('uid');
									api.openWin({
										name: 'login',
										url: '../personal/login.html',
									});
								}, 1000)
							} else if (ret.status == 2) {
								msg(ret.msg);
								setTimeout(function() {
									history.go(0);
								}, 1000)
							} else {
								msg(ret.msg);
							}
						});
					},
					online: function() {
						api.ajax({
							url: apiUrl + 'api/users/addCounts',
							method: 'post',
							data: {
								values: {
									uid: post_en($api.getStorage('uid')),
								},
							}
						}, function(ret, err) {});
					},
					ranking: function() {
						api.ajax({
							url: apiUrl + 'api/ranking/doranking',
							method: 'post',
							data: {
								values: {},
							}
						}, function(ret, err) {});
					},
					//获取分享赠送积分
					getIntegral: function() {
						api.ajax({
							url: apiUrl + 'api/home/getIntegral',
							method: 'post',
							data: {
								values: {
									uid: post_en($api.getStorage('uid')),
								},
							}
						}, function(ret, err) {
							if (ret.status) {
								alert(ret.msg);
							} else {
								alert(ret.msg);
							}
						});
					},
					//关闭弹窗
					delImg: function() {
						$('#tc').css({
							'display': 'none'
						});
					},
					//分享朋友圈
					share: function(id, time) {
						vm.aboutcontet(id, time);
					},
					getSystemnews: function() {
						api.ajax({
							url: apiUrl + '/api/index/notice',
							method: 'post',
							data: {
								values: {},
							}
						}, function(ret, err) {
							if (ret.code == 1) {
								vm.systemnews = ret.data;
								setTimeout(function() {
									upCycle();
								}, 500)
							} else {
								vm.systemnews = '';
							}
						});

					},
					//站长空间
					zzkj: function() {
						api.ajax({
							url: apiUrl + 'api/home/getzzid',
							method: 'post',
							data: {
								values: {
									uid: post_en($api.getStorage('uid')),
								},
							}
						}, function(ret, err) {
							if (ret.status) {
								api.openWin({
									name: 'kongjian',
									url: '../personal/kongjian.html',
									pageParam: {
										users_id: ret.data.id,
									}
								});
							} else {
								msg(ret.msg);
							}
						});
					},
					zhiding: function(index) {
						api.ajax({
							url: apiUrl + 'api/home/getsticky',
							method: 'post',
							data: {
								values: {},
							}
						}, function(ret, err) {
							if (ret.status) {
								var prices = ret.data;
								if (prices == "") {
									msg('置顶费用不能为空');
									return;
								}
								var dialogBox = api.require('dialogBox');
								dialogBox.alert({
									texts: {
										content: '置顶该广告将支付' + prices + '元是否置顶？',
										leftBtnTitle: '取消',
										rightBtnTitle: '确认'
									},
									styles: {
										bg: '#fff',
										w: 300,
										corner: 2,
										content: {
											color: '#000',
											size: 14
										},
										left: {
											marginB: 7,
											marginL: 20,
											w: 130,
											h: 35,
											corner: 2,
											bg: '#fff',
											size: 12
										},
										right: {
											marginB: 7,
											marginL: 10,
											w: 130,
											h: 35,
											corner: 2,
											bg: '#fff',
											size: 12
										}
									}
								}, function(ret) {
									if (ret.eventType == 'left') {
										var dialogBox = api.require('dialogBox');
										dialogBox.close({
											dialogName: 'alert'
										});
									} else if (ret.eventType == 'right') {
										var dialogBox = api.require('dialogBox');
										dialogBox.close({
											dialogName: 'alert'
										});
										api.openWin({
											name: 'pay',
											url: '../home/pay.html',
											pageParam: {
												// nickname:vm.nickname,
												release_price: prices,
												types: 6,
												ad: index,
											}
										});
									}
								});
							}
						})
					},
					//跳转到网页
					tz: function(index) {
						if (vm.webAdveList[index].url == "") {
							// msg('该广告没有跳转链接');
							return;
						}
						api.ajax({
							url: apiUrl + 'api/home/setNum',
							method: 'post',
							data: {
								values: {
									id: vm.webAdveList[index].id,
								},
							}
						}, function(ret, err) {
							if (ret.status) {
								api.openWin({
									name: 'page1',
									url: vm.webAdveList[index].url,
								});
							} else {
								msg('访问失败');
							}
						});
					},
					seeImg: function(data, index) {
						var array = [];
						for (var i = 0; i < data.imgs.length; i++) {
							array.push(apiUrl1 + data.imgs[i]);
						}
						var photoBrowser = api.require('photoBrowser');
						photoBrowser.open({
							images: array,
							placeholderImg: 'widget://res/img/apicloud.png',
							bgColor: '#000'
						}, function(ret, err) {
							  if(ret.eventType == 'longPress'){ save_img(array); }
							if (ret.eventType == 'click') {
								var photoBrowser = api.require('photoBrowser');
								photoBrowser.close();
							}
						});
						photoBrowser.setIndex({
							index: index
						});
					},
					more: function(obj) {
						if (obj.num) {
							vm.page++;
						} else {
							vm.page = 1;
							mescroll.lockUpScroll(false);
						}
						vm.daohang(vm.num);
						vm.getGuDingList();
					},
					//手动刷新
					manualRefresh: function(index) {
						if (vm.price == "") {
							api.toast({
								msg: '参数错误',
								duration: 2000,
								location: 'middle'
							});
							return;
						}
						var dialogBox = api.require('dialogBox');
						dialogBox.alert({
							texts: {
								content: '手动刷新该广告将支付' + vm.price + '积分是否刷新？',
								leftBtnTitle: '取消',
								rightBtnTitle: '确认'
							},
							styles: {
								bg: '#fff',
								w: 300,
								corner: 2,
								content: {
									color: '#000',
									size: 14
								},
								left: {
									marginB: 7,
									marginL: 20,
									w: 130,
									h: 35,
									corner: 2,
									bg: '#fff',
									size: 12
								},
								right: {
									marginB: 7,
									marginL: 10,
									w: 130,
									h: 35,
									corner: 2,
									bg: '#fff',
									size: 12
								}
							}
						}, function(ret) {
							if (ret.eventType == 'left') {
								var dialogBox = api.require('dialogBox');
								dialogBox.close({
									dialogName: 'alert'
								});
							} else if (ret.eventType == 'right') {
								var dialogBox = api.require('dialogBox');
								dialogBox.close({
									dialogName: 'alert'
								});
								api.openWin({
									name: 'pay',
									url: '../home/pay.html',
									pageParam: {
										release_price: vm.price,
										types: 7,
										ad: index,
									}
								});
							}
						});
					},
					//获取系统公告
					getBulletinList: function() {
						api.ajax({
							url: apiUrl + 'api/home/getBulletinList',
							method: 'post',
							data: {
								values: {},
							}
						}, function(ret, err) {
							if (ret.status) {
								vm.content = ret.data;
							} else {}
						});

					},

					getNewList: function() {
						api.ajax({
							url: apiUrl + '/api/index/withdraw',
							method: 'post',
							data: {
								values: {},
							}
						}, function(ret, err) {
							console.log(ret)
							if (ret.code == 1) {
								vm.newList = ret.data;
								setTimeout(function() {
									demo();
									//  vm.daohang(index=0);
								}, 500);
							} else {
								vm.newList = ret.data;
							}
						});
					},
					fenxiang: function() {
						alert('开发中......');
					},
					shuaxin: function() {
						history.go(0);
					},
					//搜索
					soushuo: function() {
						var guanjianci = vm.guanjianci;
						vm.guanjianci = "";
						api.openWin({
							name: 'shou',
							url: '../shousuo/shou.html',

							pageParam: {
								guanjianci: guanjianci
							}
						});
					},
					//固定头条
					getGuDingList: function() {
						api.ajax({
							url: apiUrl + '/api/index/toutiao',
							method: 'post',
							data: {
								values: {},
							}
						}, function(ret, err) {
							console.log(JSON.stringify(ret))
							if (ret.code==1) {
								vm.list = ret.data;
							} else {
								vm.list = ret.data;
							}
						});

					},
					//站长广告
					getWebAdver: function() {
						api.ajax({
							url: apiUrl + '/api/index/slides',
							method: 'post',
							data: {
								values: {
									uid: $api.getStorage('uid'),
								},
							}
						}, function(ret, err) {
							if (ret.code == 1) {
								vm.webAdveList = ret.data;
								console.log()
								Vue.nextTick(function() {
									beginSlide();
								})
							} else {
								vm.webAdveList = '';
							}
						});

					},
					getsection: function() {
						api.ajax({
							url: apiUrl + '/api/index/nav',
							method: 'post',
							data: {
								values: {},
							}
						}, function(ret, err) {
							console.log(ret)
							if (ret.code == 1) {
								vm.daohangdata = ret.data;
								// vm.daohang(index=0);
							} else {
								vm.daohangdata = '';
							}
						});
					},
					daohangs: function(id, index, title) {
						vm.id = id;
						if (index != 'undefined') {
							vm.num = index;
						} else {
							vm.num = index;
						}
						vm.daohanglist = [];
						vm.daohang(vm.id);
					},
					//导航页面
					daohang: function(id) {
						/* let a=0; */
						console.log("page:" + vm.page)
						if (vm.num) {
							setTimeout(function() {
								var nav = $('#nav' + vm.num).offset().left;
								var nav1 = $('#nav1').offset().left; //-57.203125
								var nav2 = $('#nav2').offset().left; //13.1875
								var nav3 = $('#nav3').offset().left; //39.5625
								var nav4 = $('#nav4').offset().left; //39.5625
								//第一到第三个的总距离
								var navs3 = nav1 + nav2 + nav3; //
								var navs4 = nav1 + nav2 + nav3 + nav4; //
								if (vm.num == 1) {
									$('#wrap').scrollLeft(0);
								}
							}, 500)
						}
						api.showProgress({
							title: '努力加载中...',
							text: '先喝杯茶...',
							modal: false
						});
						if (vm.daohangdata[vm.num]) {
							var id = vm.daohangdata[vm.num].id;
						}else{
							var id=1;
						}
						/* console.log(JSON.stringify(vm.daohangdata)+"121111111111111111111111111111111111111111111") */
						console.log(id+"121111111111111111111111111111111111111111111")
						api.ajax({
							url: apiUrl + '/api/index/task',
							method: 'post',
							data: {
								values: {
									type: id,
									page: vm.page
								},
							}
						}, function(ret, err) {
							if (vm.page == 1) {
								vm.daohanglist = [];
							}
							if (ret.code == 1) {
								console.log(JSON.stringify(ret))
								if (vm.daohanglist.length >= ret.data.total && vm.daohanglist.length != 0) {
									api.hideProgress();
									msg("我也是有底线的！");
									mescroll.lockUpScroll(true);
								} else {
									api.hideProgress();
									for (var i = 0; i < ret.data.list.length; i++) {
										vm.daohanglist.push(ret.data.list[i]);
									}
									}
									
							}

							mescroll.endUpScroll(false);
							mescroll.endSuccess();
						});
					},
					//个人空间
					kongjian: function(id) {
						api.openWin({
							name: 'kongjian',
							url: '../personal/kongjian.html',
							pageParam: {
								uid: id
							}
						});
					},
					//详情
					aboutcontet: function(id) {
						console.log(id)
						api.openWin({
							name: 'guanggao_details',
							url: '../personal/guanggao_details.html',
							pageParam: {
								id: id
							}
						});
					},
				}
			})
		}

		function exit_init() {
			var top = api.winHeight / 2 - 40;
			var left = (api.winWidth - $(".public-exit").outerWidth(true)) / 2;
			$(".public-exit").css({
				"top": top + "px",
				"left": left + "px"
			});
		}

		function showAlert() {
			$(".public-exit").css({
				"display": "block"
			});
		}

		function hideAlert() {
			$(".public-exit").css({
				"display": "none"
			});
		}

		function NewMescroll() {
			mescroll = new MeScroll("mescroll", {
				down: {
					use: true,
					auto: true,
					hardwareClass: "mescroll-hardware",
					// autoShowLoading:true,
					callback: vm.more, //下拉刷新的回调,别写成downCallback(),多了括号就自动执行方法了
				},
				up: {
					use: true,
					auto: false,
					lazyLoad: {
						use: true, // 是否开启懒加载,默认false
						attr: 'imgurl', // 网络地址的属性名 (图片加载成功会移除该属性): <img imgurl='网络图  src='占位图''/>
						showClass: 'mescroll-lazy-in', // 图片加载成功的显示动画: 渐变显示,参见mescroll.css
						delay: 500, // 列表滚动的过程中每500ms检查一次图片是否在可视区域,如果在可视区域则加载图片
						offset: 200 // 超出可视区域200px的图片仍可触发懒加载,目的是提前加载部分图片
					},
					callback: vm.more, //上拉刷新的回调,别写成downCallback(),多了括号就自动执行方法了
				}
			})
		}
		// function btnClick() {
		//  var news = vm.newList;
		//  //获取元素
		//   var cent = document.getElementById("main");
		//   for(var i=0;i<news.length;i++){
		//       cent.innerHTML += '<li><div class="home-msg flex wrap"><div class="home-msg-lf"><img src="../../image/public/home6.png" alt=""></div><div class="home-msg-rt">恭喜'+news[i].name+'喜提'+news[i].payprice+'元分润</div></div></li>';
		//   }
		// }
		function demo() {
			var box = document.getElementById('scroll-box');
			var parent = document.getElementsByTagName('ul')[0];
			var parent2 = document.getElementsByTagName('ul')[1];
			parent2.innerHTML = parent.innerHTML
			// 单行向上滚动效果
			var timer = setInterval(autoScrollLine, 30)

			function autoScrollLine() {
				//判断滚动内容是否已经滚动完，滚完了则滚动的值重新设置到0否则就每隔30秒向上滚动1px
				if (box.scrollTop >= parent.offsetHeight) {
					box.scrollTop = 0;
				} else {
					box.scrollTop++;
				}
				//判断滚动的距离刚好为一条公告的高度时停掉定时器。隔1s之后重新启动定时器即可实现公告滚动停留效果
				if (box.scrollTop % box.offsetHeight == 0) {
					clearInterval(timer);
					setTimeout(function() {
						timer = setInterval(autoScrollLine, 30);
					}, 1000);

				}
			}
		}
		// (function(){var timer = setTimeout(this.upCycle, 1000);}());
		function upCycle() {
			var upScrollWidth = $('.up').width();
			var upTextWidth = $('.up_text').width();
			var i = upScrollWidth;
			setInterval(function() {
				i--;
				if (i < -upTextWidth) {
					i = upScrollWidth;
				}
				$('.up_text').animate({
					'left': i + 'px'
				}, 8);
			}, 8);

			var downScrollWidth = $('.down').width();
			var downTextWidth = $('.down_text').width();
			var j = downScrollWidth;
			setInterval(function() {
				j--;
				if (j < -downTextWidth) {
					j = downScrollWidth;
				}
				$('.down_text').animate({
					'left': i + 'px'
				}, 8);
			}, 8);
		}
		// 轮播
		function beginSlide() {
			if (mySwiper) {
				mySwiper.destroy(true);
			}
			mySwiper = new Swiper('.swiper-container', {
				autoplay: true, //可选选项，自动滑动
				pagination: {
					el: '.swiper-pagination',
					type: 'bullets',
					bulletElement: 'li',
				},
				on: {
					slideChangeTransitionStart: function() {
						// alert(this.activeIndex);
						for (var i = 0; i < $(".swiper-pagination li").length; i++) {
							$(".swiper-pagination li").css({
								"width": "8px",
								"background-color": "rgba(255,255,255,0.5)"
							});
						}
						$(".swiper-pagination li:eq(" + this.activeIndex + ")").css({
							"width": "20px",
							"background-color": "#fff"
						});
					},
				},
			})
			$(".swiper-pagination li").css({
				"width": "8px",
				"background-color": "rgba(255,255,255,0.5)"
			});
			$(".swiper-pagination li:eq(0)").css({
				"width": "20px",
				"background-color": "#fff"
			});
		}

		function timeOut() {
			setTimeout(function() {
				vm.time--;
				if (vm.time <= 0) {
					vm.showCode = false;
					vm.time = 60;
					return;
				}
				timeOut();
			}, 1000);
		}
	</script>
</html>
